﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OracleClient;

using System.Text;
using System.Data.SqlClient;

namespace DotNETX.Authentication.Db.Oracle
{
    internal static class ParameterUtils
    {
        public static string CreateParam(IDbCommand cmd, string paramName, object paramValue)
        {
            string paramExpression = null;
            IDataParameter param = null;
            if (cmd == null || paramName == null)
            {
                return null;
            }
            param = cmd.CreateParameter();
            param.Value = paramValue;

            param.ParameterName = paramName;
            paramExpression = ":" + paramName;

            cmd.Parameters.Add(param);
            return paramExpression;
        }
    }
}
